<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>获取其他8个对象</title>
</head>
<body>
<%
//保存到page容器里
pageContext.setAttribute("key01", "value01");
pageContext.setAttribute("key02", "value02",pageContext.PAGE_SCOPE);
pageContext.setAttribute("key03", "value03", pageContext.SESSION_SCOPE);
%>
<%
String content01=(String)pageContext.getAttribute("key01", pageContext.PAGE_SCOPE);
out.write("page容器里的内容为："+content01+"。");
String content02=(String)pageContext.getAttribute("key02");
out.write("page容器里的内容为："+content02+"。");
%>
</body>
</html>